<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 盒子添加 box-sizing:border-box 盒子的宽高为整体宽高 */
        /* padding border 变为内缩,而不是外扩 */
        /* PC端少用,移动网页大量运用 结合百分比,弹性布局好用 IE9*/
        .box{
            width: 200px;
            height:200px;
            border: 10px solid #000;
            padding:10px;
            box-sizing:border-box;
        }
    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>